# -*- coding: utf-8 -*-
# @Time : 2022/7/24 12:11
# @Author : WangYunfei
# @FileName: 数据服务.py
# @Email: lxb_wyf@163.com
"""

"""
import requests


class JG(object):

    def __init__(self):
        self.url = "https://jzsc.mohurd.gov.cn/api/webApi/asite/qualapt/aptData"
        self.headers = {
            "Accept": "application/json, text/plain, */*",
            "Accept-Encoding": "gzip, deflate, br",
            "Accept-Language": "zh-CN,zh;q=0.9",
            "accessToken": "",
            "Connection": "keep-alive",
            "Host": "jzsc.mohurd.gov.cn",
            "Referer": "https://jzsc.mohurd.gov.cn/data/company",
            "sec-ch-ua": "\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\"",
            "sec-ch-ua-mobile": "?0",
            "sec-ch-ua-platform": "\"Windows\"",
            "Sec-Fetch-Dest": "empty",
            "Sec-Fetch-Mode": "cors",
            "Sec-Fetch-Site": "same-origin",
            "timeout": "30000",
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"
        }

    def spider(self):
        res = requests.get(url=self.url, headers=self.headers)
        print(res.status_code)
        print(res.text)

    def js(self):
        pass


if __name__ == '__main__':
    JG().spider()




